<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title></title>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/meta.jsp"%>
</head>
<body>
<div class="x-panel-body">
<div class="x-toolbar" style="border:1px solid #A9BFD3; height: 25px; line-height: 25px; padding-left: 10px;">
  <b>评论列表</b>【最新5条】
</div>
<ec:table
	items="items" 
	var="item" 
	retrieveRowsCallback="process"
	sortRowsCallback="process" 
	action="index.do" 
	useAjax="false"
	doPreload="false" 
	pageSizeList="5,10,50,100" 
	editable="false"
	sortable="false" 
	rowsDisplayed="5" 
	generateScript="true"
	resizeColWidth="false" 
	classic="false" 
	width="900" 
	height="360px"
	minHeight="360"
	showHeader="false"
	toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	<ec:row>
      	<ec:column width="140" property="_nam_time" title="" style="line-height:25px;">
      	&nbsp;发布人：${item.commenter.name}<br>
      	&nbsp;<s:property value="#attr.item.createTime"/> 	
      	</ec:column>
      	<ec:column width="700" property="content" style ="vertical-align:top; padding-top:5px; padding-top:5px;"/>
	    <stc:role ifAllGranted = "ROLE_ADMIN">
      	  <ec:column width="40" property="_0" style="vertical-align:top; text-align:center;">
      	    <a href="#" onclick="romoveComment(${item.id}, ${item.news.id})">【删除】</a>
      	  </ec:column>
      	</stc:role>      	
	</ec:row>
</ec:table>
</div>
<script type="text/javascript">
function romoveComment(commentId, newsId){
  if (confirm("您是否要删除该条评论信息?")) {
	window.location.href="${ctx}/news/comment/remove.do?model.id=" + commentId+ "&newsId=" + newsId;;
  }	
}
</script>
</body>
</html>